home *** CD-ROM | disk | FTP | other *** search
- Path: symiserver2.symantec.com!usenet
- From: Walter Bright <wbright@symantec.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Qsort & class - HELP
- Date: Sat, 02 Mar 1996 22:15:08 -0800
- Organization: Symantec Development Tools Business Unit
- Message-ID: <313938EC.3648@symantec.com>
- References: <1996Mar2.145458.4120@news.huji.ac.il>
- NNTP-Posting-Host: 155.64.77.55
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (WinNT; I)
-
- shalitin wrote:
-
- < I am trying to qsort() array of pointers to classes, and I don't succeed.
- < I have no idea why this is happenning, but I think the sourse of the problem
- is in
- < the CompareNames() function.
- < friend int CompareNames( const void *name1, const void *name2 )
- < {
- < return stricmp( ((Names*)name1)->Name, ((Names*)name2)->Name );
- < }
-
- I think your problem is that the parameter is actually a Names**, not a Names*.
-